package itheima.Test;
public class Test {
    public static void main(String[] args) {
        Student s1 = new Student("zhangsan", 21);
        Student s2 = new Student("lisi", 22);
        method1(s1);  // method1传递s1这个学生,s1.eat()  s1.sleep()
        method1(s2);  // method1传递s2这个学生,s2.eat()  s2.sleep()
    }
    // 定义一个方法,参数: 学生对象
    public static void method1(Student s1){
        /*
        * 调用这一个method1方法直接执行这两个方法eat() sleep()
        * */
        s1.eat();
        s1.sleep();
    }

}
